import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'

@Entity('user')
export class User {
    @PrimaryGeneratedColumn('uuid')
    id: string;

    @Column({
        type: 'varchar',
        length: 50,
        unique: true,
        comment: '用户名',
    })
    username: string

    @Column({
        type: 'varchar',
        length: 50,
        comment: '密码',
        unique: false,
    })
    password: string

    @Column({
        type: 'varchar',
        length: 255
    })
    nickname: string

    @Column({
        type: 'varchar',
        length: 255
    })
    avatar: string
}
